<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<html> 
<head> 
<title></title> 
	<link rel="stylesheet" type="text/css" href="../easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../easyui/themes/icon.css">
	<script type="text/javascript" src="../easyui/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="../easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../js/common.js"></script>
	
	<link rel="stylesheet" type="text/css" href="../css/common.css">
	<link rel="stylesheet" type="text/css" href="../css/table.css">

<script>
function showInfo(){
	if("${msg}"!=""){
		$.messager.show({
			title:'提示',
			msg:"${msg}",
			timeout:5000,
			showType:'slide'
		});
	}
}
function check(){
	if(fm.oldPassword.value==""){
		$.messager.alert('提示','请输入原始密码','warning');
		return;
	}
	if(fm.newPassword.value==""){
		$.messager.alert('提示','请输入新密码','warning');
		return;
	}
	if(fm.newPassword2.value==""){
		$.messager.alert('提示','请再次输入新密码','warning');
		return;
	}
	if(fm.newPassword2.value != fm.newPassword.value){
		$.messager.alert('提示','新密码两次输入不一致，请重新输入！','warning');
		return;
	}
	if(fm.newPassword2.value.length < 6){
		$.messager.alert('提示','密码长度至少6位','warning');
		return;
	}
	
	fm.submit();
}
</script>
</head> 
<body onload="showInfo()">
<form action="updatePassword.html" name="fm" method="post" >
<table width="40%" border="0" cellspacing="1" align="center" cellpadding="1" class="ListTable">
	<thead>
		<tr>
			<td align="center" class="TableRow" colspan="2" nowrap style= "border-bottom:1">
					&nbsp;修改密码&nbsp;
			</td>
		</tr>
	</thead>
	<TBODY>
	<TR>
		<TD width="20%" height="30" align="center" class="RecordRow" nowrap style= "border-bottom:1" style="border-right:1">原始密码&nbsp;</TD>
		<TD class="RecordRow" nowrap style= "border-bottom:1">&nbsp;
			<INPUT type="password"    class=textColorWrite name="oldPassword" ><font color="red" style="center">*</font>
		</TD>
	</TR>
	<TR>
		<TD height="30" align="center" class="RecordRow" nowrap style= "border-bottom:1" style="border-right:1">新密码&nbsp;</TD>
		<TD class="RecordRow" nowrap style= "border-bottom:1">&nbsp;
			<INPUT type="password" class=textColorWrite name="newPassword" ><font color="red" style="center">*</font>
		</TD>
	</TR>
	<TR>
		<TD height="30" align="center" class="RecordRow" nowrap style= "border-bottom:1" style="border-right:1">确认新密码&nbsp;</TD>
		<TD class="RecordRow" nowrap style= "border-bottom:1">&nbsp;
			<INPUT  type="password"  class=textColorWrite name="newPassword2" ><font color="red" style="center">*</font>
		</TD>
	</TR>
	<TBODY>
</table>
</form>

<table width="40%" border="0" cellspacing="1" align="center" cellpadding="1" class="ListTable">
<tr align=center>
<td >
	 <input type="reset" class="mybutton" value='重置' onclick="fm.reset()"/> &nbsp;
	 <input type="button" class="mybutton" value='修改' onclick="check()"/> &nbsp;
<tr>
</table>
</body>
</html>